<div class = "category_dropdown ">
<?php
	$key = "category_dropdown_module_category_options";
	GigaCache::set(array('path'=>CACHE,'duration'=>'+1 day'));
	$categoryTree = GigaCache::read($key);
	if(!is_array($categoryTree))
	{
		$categoryTree = cri("ListCategory")->getOptionsWithSlug();
		GigaCache::write($key,$categoryTree);
	}
	echo $form->input('category_id',array('label'=>'','type'=>'select','options'=>$categoryTree,'empty'=>__('-Select-'),'onchange'=>'return showCategory(this);'));
?>	
</div>
<script type="text/javascript">

function showCategory(caller)
{	
	var category_id = $(caller).val();
	if(category_id)
	{
		window.location = URL+'categories/view/'+category_id;
	}	
}
</script>